home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Apple II Sample Code / MPW IIGS SC / SC.002.BusyBox / busybox.p / busy.p next >
Encoding:
Text File  |  1990-06-19  |  1.6 KB  |  74 lines  |  [TEXT/MPS ]

  1. {**********************************************************************
  2. {*
  3. {* BusyBox -- Version 3.0  (Main Program)
  4. {*
  5. {* Copyright (c)
  6. {* Apple Computer, Inc.  1986-1989
  7. {* All Rights Reserved.
  8. {*
  9. {* This file contains the busybox program.
  10. {*
  11. {**********************************************************************}
  12. {$R-}
  13.  
  14. program BusyBox;
  15.  
  16. USES 
  17.         types,
  18.         gsos,
  19.         Quickdraw,
  20.         fonts,
  21.         memory,
  22.         IntMath,
  23.         events,
  24.         prodos,
  25.         locator,
  26.         controls,
  27.         windows,
  28.         lists,
  29.         scrap,
  30.         lineedit,
  31.         dialogs,
  32.         menus,
  33.         desk,
  34.         STDFile,
  35.         QDAUX, 
  36.         print,
  37.         miscTool,
  38.         resources,
  39.         
  40.  
  41.         uGlobals,  { HodgePodge Code Units }
  42.         uUtils,
  43.         uWindow,
  44.         uMenu,
  45.         uEvent;
  46.  
  47. var
  48.     InitRef : ref;      { This holds the reference to the startstop record }
  49.  
  50.  
  51. BEGIN  { of MAIN program BusyBox }
  52.  
  53.     { Init our globals. }
  54.     InitGlobals;
  55.  
  56.     MyMemoryID := MMStartup;            { Start up & get ID from the Memory Manager }
  57.     TLStartUp;                            { Start up the tool locator }
  58.  
  59.                                         { Startup the tools using the new toolbox call }
  60.     InitRef := StartupTools(MyMemoryID,RefIsResource,ref(1));
  61.     if _toolErr = 0 then    { note: usage of _toolErr may vary between compilers }
  62.         begin
  63.             SetUpMenus;     { Set up menus }
  64.             SetupWindows;
  65.             InitCursor;     { Make cursor show ready }
  66.             MainEvent;      { Use application }
  67.         end;
  68.  
  69.     { Let the toolbox shutdown the tools. }
  70.     ShutDownTools(RefIsHandle,InitRef);
  71.     TLShutDown;                { Shut down the tool locator }
  72.  
  73. END.   { of MAIN program BusyBox }
  74.